using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace Week1.particles
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class Ring : BaseParticle
    {
        private float fAngle = 0;
        public Ring(Game game, string textureName, player.Camera camera, int scale)
            : base(game, textureName, camera, scale, 1)
        {
        }

        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public override void Initialize()
        {
            iCount = 1;
            oPosition[0] = Vector3.Zero;
            oWorld[0] = Matrix.CreateRotationX((float)3.14 / 2) * Matrix.CreateWorld(oPosition[0], Vector3.Forward, Vector3.Up);
            base.Initialize();

        }

        /// <summary>
        /// Allows the game component to update itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            fAngle+=.1f;
            
            oWorld[0] = Matrix.CreateRotationZ(0.0002f) * oWorld[0];

            //base.Update(gameTime);
        }
    }
}
